package com.uzai.common.enums;

/**
 * @author jianghan
 * @date 2022-04-21 15:37
 */
public enum SysMsgTypeEnum {
    NOTICE(0,"官方重要通知","SMS_225369475","importantNotice"),
    APP_UPDATE(1,"软件升级提醒","SMS_239322146","softwareUpdate"),
    TB_TOKEN_EXPIRED(2,"淘宝联盟授权过期","SMS_239326864","tbTokenExpired"),
    //抖客联盟到期报警消息采用淘宝联盟到期报警短信
    DY_TOKEN_EXPIRED(11,"抖客联盟授权过期","SMS_239326864","dyTokenExpired"),
    PDD_TOKEN_EXPIRED(3,"多多进宝授权过期","SMS_239326864","pddTokenExpired"),
    VPH_TOKEN_EXPIRED(4,"唯品会联盟授权过期","SMS_239326864","vphTokenExpired"),
    MER_BALANCE_DEFICIENCY(5,"运营商余额不足提醒","SMS_239311865","operatorBalancePoor"),
    UZAIPAY_BALANCE_DEFICIENCY(6,"账房余额不足提醒","SMS_231447411","accountBalancePoor"),
    TAKE_BALANCE_HANDER(7,"提现需手动处理通知","SMS_183261368","takeBalanceHander"),
    BLACK_USER_REG(8,"黑名单用户添加通知","SMS_239321838","blacklistAddUser"),
    ORDER_EXCEPTION(9,"订单亏损通知","SMS_239316972","orderLoss"),
    ORDER_REFUND_CREATE(10,"淘宝维权订单创建通知","SMS_239316978","refundOrderAdd"),

    JD_ORDER_REFUND_FINISH(29,"京东维权订单完成通知","SMS_239316978","jdRefundOrderFinish"),
    DY_ORDER_REFUND_FINISH(30,"抖音维权订单完成通知","SMS_239316978","dyRefundOrderFinish"),
    PDD_ORDER_REFUND_FINISH(31,"拼多多维权订单完成通知","SMS_239316978","pddRefundOrderFinish"),
    VPH_ORDER_REFUND_FINISH(32,"唯品会维权订单完成通知","SMS_239316978","vphRefundOrderFinish"),
    MT_ORDER_REFUND_FINISH(33,"美团维权订单完成通知","SMS_239316978","mtRefundOrderFinish"),
    ELM_ORDER_REFUND_FINISH(34,"饿了么维权订单完成通知","SMS_239316978","elmRefundOrderFinish"),
    KS_ORDER_REFUND_FINISH(36,"快手维权订单完成通知","SMS_239316978","ksRefundOrderFinish"),

    //value=11已经给抖客联盟到期报警使用
    OPE_SEND_REDPACK(12,"手动发送红包通知","SMS_239311911","redHander"),
    OPE_UPDATE_USER(13,"手动修改用户敏感信息(会员身份/上下级/类型)","SMS_239326910","modifyUserInfo"),
    OPE_UPDATE_ORDER_BIND(14,"手动修改订单绑定通知","SMS_239321984","modifyOrderUser"),
    WX_MSG_OFTEN(15,"微信发送消息频繁通知","SMS_239312018","oftenSendWechatMessage"),
    OPE_DEL_DEVICE(16,"用户删除机器人通知","SMS_239322009","deleteDevice"),
    PRO_AUTH_EXPIRED(17,"软件或服务授权到期通知","SMS_239312044","softwareExpired"),
    USER_BALANCE_ERR(18,"用户余额为负数通知","SMS_239322012","userBalanceNegative"),
    CALL_SERVICE(19,"呼叫客服通知","SMS_239327042","callService"),
    DOMAIN_DISABLED(20,"域名封禁通知","SMS_239312058","domainNameBan"),
    SYS_MSG_UNKNOWN(21,"收到系统无法识别的消息","SMS_239317168","unknownMessage"),
    SYS_SET_ERR(22,"系统设置错误","SMS_239322026","systemSetError"),
    OTHER_EXCEPTION(23,"其他异常通知","SMS_239327057","otherException"),
    BLACKLIST_SEND_MESSAGE(24,"黑名单用户发消息","SMS_242905411","blacklistSendMessage"),
    TURN_LINK_ERROR(25,"查券异常","SMS_243412510","turnLinkError"),
    TRADER_BALANCE_DEFICIENCY(26,"商户余额不足","SMS_250890882","traderBalancePoor"),
    DOWNLOAD_ORDER_LIMIT(27,"订单下载限流","SMS_258725174","tbOrderDownloadLimit"),
    TOOLS_TOKEN_OFFLINE(28,"悠哉工具箱掉线通知","SMS_239327057","uzaiToolBoxOutLine"),

    OPE_UPDATE_USER_BAL_INTE(35,"手动修改用户敏感信息(余额/积分)","SMS_239326910","modifyUserInfoBalAndInte"),

    //设备异常提醒
    CLIENT_QUIT(50,"客户端退出","SMS_240375527","client_quit"),
    WEIXIN_QUIT(51,"微信退出","SMS_240375527","weixin_quit"),
    WEIXIN_DEATH(52,"微信假死","SMS_240375532","weixin_death"),
    CPU_MEMORY(53,"CPU/内存/话费余额不足","SMS_240380533","cpu_memory"),
    MOBILE_BATTERY(54,"手机电量过低","SMS_251026556","mobile_battery"), // SMS_250986474
    UNUSUAL_LOCATION_LOGIN(55,"异地登录","SMS_259840736","unusualLocationLogin"),


    //风险控制(value > 500)
    ORDER_COMMISSION_LARGE(500,"多笔订单佣金比例过大","SMS_239321865","manyOrderCommissionLarge"),
    MANY_USER_TAKE_BAL_LARGE(501,"用户提现通知","1703674","manyUserTakeBalLarge"),


    ;

    private Integer value;
    private String desc;
    private String smsCode;
    private String key;

    SysMsgTypeEnum(Integer value, String desc,String smsCode,String key) {
        this.value = value;
        this.desc = desc;
        this.smsCode = smsCode;
        this.key = key;
    }

    public Integer getValue() {
        return value;
    }

    public void setValue(Integer value) {
        this.value = value;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public String getSmsCode() {
        return smsCode;
    }

    public void setSmsCode(String smsCode) {
        this.smsCode = smsCode;
    }

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public static SysMsgTypeEnum getById(Integer id) {
        if (id == null) {
            return null;
        }
        for (SysMsgTypeEnum type: SysMsgTypeEnum.values()) {
            if (type.getValue().intValue() == id.intValue()) {
                return type;
            }
        }
        return null;
    }
}
